/********************************************************
 Name          : cmx7164_api.h
 Author        : Khachatur Gyozalyan
 Copyright     : Copyright by Antel Systems
 Description   :
 **********************************************************/

#ifndef CMX7164_API_H_
#define CMX7164_API_H_

// Include Files
#include "arch/cc.h"
#include "cmx7164.h"


typedef enum {
        UHF_SUCCESS,
        UHF_FAILURE,
} uhf_err_t;

extern unsigned char UsageBlockType;

unsigned int GetBlocSize(unsigned char modulation);
unsigned int GetBlocType(void);
unsigned int GetModulationType(void);
unsigned int GetTimeslotLength(void);

struct CbtbFunctional
{
	char           Max_Output_Power;
	char           Min_Output_Power;
	char           Number_of_Frequency_Sub_Bands;
	char           Number_of_Output_Power_Levels;
	unsigned int   Freq;
	short          FreqErr;
	unsigned short reserved;
};

struct CbtbOutputPowerLevel
{
	char           Output_Power;
	char           Fwd_Attenuator;
	char           Feedback_Attenuator;
	char           Phase_Shift;
	unsigned short V_APC;
	unsigned short Baseband_Attenuation;
};

struct CbtbRssi
{
	unsigned short k_coefficient_of_RSSI;
	unsigned short b_coefficient_of_RSSI;
	short          High_Gain_Switching_RSSI_Level;
	short          Low_Gain_Switching_RSSI_Level;
	short          I_DC_Offset_for_High_Gain;
	short          Q_DC_Offset_for_High_Gain;
	short          I_DC_Offset_for_Low_Gain;
	short          Q_DC_Offset_for_Low_Gain;
};

//int cmx7164_set_9600_boud(void);

#endif /* CMX7164_API_H_ */
